/*
 * ShoppingCartAdapter.java
 * business
 *
 * Created by ChenTao on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.adapter;

import android.content.Context;

import com.yidiandao.business.ui.widget.listview.CommonAdapter;
import com.yidiandao.business.ui.widget.listview.DisplayItemManager;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartDividerListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartGoodsGiftListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartGoodsListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartGoodsReduceListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartInvalidClearListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartInvalidListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartOrderGiftListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartOrderReduceListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartShopCarriageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.ShoppingCartShopListItem;

/** 购物车页面Adapter. */
public class ShoppingCartAdapter extends CommonAdapter<DisplayListItem> {

    public ShoppingCartAdapter(Context context) {
        super(context);
    }

    @Override
    protected void registerDisplayListItemMap() {
        DisplayItemManager.register(getAdapterTag(), ShoppingCartGoodsListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartShopListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartInvalidListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartDividerListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartInvalidClearListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartGoodsGiftListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartOrderGiftListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartGoodsReduceListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartOrderReduceListItem.class);
        DisplayItemManager.register(getAdapterTag(), ShoppingCartShopCarriageListItem.class);
    }

    @Override
    protected String getAdapterTag() {
        return ShoppingCartAdapter.class.getSimpleName();
    }
}
